Regarding systems for detecting an in-focus state of a photographing lens in a digital camera that photographs using an image sensor, an apparatus that performs pupil division-based focus detection using a two-dimensional sensor is disclosed in Japanese Patent Laid-Open No. 58-24105, where the two-dimensional sensor has a microlens formed in each pixel. In the apparatus disclosed in Japanese Patent Laid-Open No. 58-24105, a photoelectric converter in each pixel of the image sensor is divided into multiple parts and the divided photoelectric converter is configured to receive a luminous flux passing different areas of a pupil of the photographing lens via the microlens.
Also, Japanese Patent No. 2959142 discloses a solid-state image sensing apparatus that combines an image sensor and in which pixels are arranged two-dimensionally with the relative position of a microlens and a photoelectric converter shifted. The solid-state image sensing apparatus disclosed in Japanese Patent No. 2959142 detects the in-focus state of the photographing lens based on images generated in pixel columns that differ in the relative shift direction of the microlens and the photoelectric converter. On the other hand, when capturing an ordinary image, the solid-state image sensing apparatus generates an image by adding signals from pixels that differ in the relative shift direction of the microlens and the photoelectric converter.
Also, in Japanese Patent Laid-Open No. 2005-106994, the present inventor discloses a solid-state image sensing apparatus that performs pupil division-based focus detection using a CMOS image sensor (solid-state image sensing apparatus) used in a digital still camera. With the solid-state image sensing apparatus disclosed in Japanese Patent Laid-Open No. 2005-106994, in some of a large number of pixels in the solid-state image sensing apparatus, the photoelectric converter is divided into two parts to detect focus state of the photographing lens. The photoelectric converter is configured to receive a luminous flux passing a predetermined area of a pupil of the photographing lens via the microlens.
FIG. 22 is an explanatory diagram illustrating a distribution of light received by a pixel that performs focus detection and is located at the center of a solid-state image sensor disclosed in Japanese Patent Laid-Open No. 2005-106994. FIG. 22 shows areas on the pupil of the photographing lens from which the two parts of the divided photoelectric converter can receive light. In FIG. 22, a circle represents an exit pupil of the photographing lens. White areas Sα and Sβ are the areas from which the two parts of the divided photoelectric converter can receive light. Normally, the two areas are set to be symmetric with respect to an optical axis of the photographing lens (intersection of an x axis and y axis in FIG. 22).
Cameras detect the focus state of the photographing lens using a correlation calculation between an image generated by a luminous flux passing through the area Sα and an image generated by a luminous flux passing through the area Sβ on the pupil of the photographing lens. A method for detecting focus using a correlation calculation between images generated by a luminous flux passing through different pupil areas of a photographing lens is disclosed in Japanese Patent Laid-Open No. 5-127074.
Also, Japanese Patent Laid-Open No. 5-127074 discloses a technique for detecting the focus state after deforming a specific filter contained in a camera according to an aperture ratio, an exit pupil position, and an amount of image displacement and adapting the deformed filter to a subject image.
When detecting the focus state, it is common practice to detect the focus of not only a subject located at the center of a photographic screen, but also subjects located on peripheries of the photographic screen. However, on the peripheries of the photographic screen, the areas Sα and Sβ on the pupil of the photographing lens become asymmetric because of vignetting of a luminous flux caused by a lens frame or the like of the photographing lens. This results in low agreement between the image generated by the luminous flux passing through the area Sα on the pupil of the photographing lens and the image generated by the luminous flux passing through the area Sβ on the pupil of the photographing lens. Thus, the inventions disclosed in Japanese Patent Laid-Open No. 58-24105, Japanese Patent No. 2959142, and Japanese Patent Laid-Open No. 2005-106994 have a problem in that accurate focus detection is not possible on the peripheries of the photographic screen if a correlation calculation is performed based on the image generated by the luminous flux passing through the area Sα on the pupil of the photographing lens and the image generated by the luminous flux passing through the area Sβ on the pupil of the photographing lens.
Also, the technique disclosed in Japanese Patent Laid-Open No. 5-127074 has the disadvantage that images cannot be restored according to vignetting state of the luminous flux even if the specific filter contained in the camera is deformed according to conditions.